const middleSession = function(req,res,next){
    console.log(req.session.username)
    if(!req.session && !req.session.username){
        res.json({
            code: -1,
            msg:'请先登录',
            data:null
        })
    }else{
        next()
    }
    
}
module.exports = middleSession